echo off
 
set str1=Hello
set str2=World
set joint=
call :myStrJoint %str1%,%str2%,joint
echo %joint%
pause 
 
REM join two strings witch space
:myStrJoint
set new_str=%~1 %~2
set %~3=%new_str%
goto:eof